﻿using System;
using System.Data;
using System.Configuration;
using System.Text;

using HtmlAgilityPack;
/// <summary>
/// Summary description for SJCPrice
/// </summary>
/// 
namespace WorldIndexInfo
{
    public class WorldIndex
    {
        
        #region "Member variable"
       public Index Nadaqinfo= new Index() ;
       public Index SP500info = new Index();
       public Index Londoninfo = new Index();
       public Index JASDAQinfo = new Index();
       public Index Russiainfo = new Index();
       public Index Hongkonginfo = new Index();
       public Index Nikkei225info = new Index();
       public Index DJIAinfo = new Index();
        
       /* protected Price _Hcm = new Price();
        protected Price _Ha_noi = new Price();
        protected Price _Da_nang = new Price();
        protected Price _Nha_trang = new Price();
        protected Price _Can_tho = new Price();
*/
        private string _LinkService;

        public string LinkService
        {
            get { return _LinkService; }
            set { _LinkService = value; }
        }
 
        #endregion
       


        public virtual void getInfo()
        { 
        
        }

        protected void setNewValue()
        {
            //if(GoldenPrice.UniqueInstance.flag==true)
            if ((this.Nadaqinfo.Value!= "") && (this.Russiainfo.Value != ""))
            {
                WorldIndex.UniqueInstance.Nadaqinfo = this.Nadaqinfo;
                WorldIndex.UniqueInstance.SP500info = this.SP500info;
                WorldIndex.UniqueInstance.JASDAQinfo = this.JASDAQinfo;
                WorldIndex.UniqueInstance.Russiainfo = this.Russiainfo;
                WorldIndex.UniqueInstance.Londoninfo = this.Londoninfo;
                WorldIndex.UniqueInstance.Hongkonginfo = this.Hongkonginfo;
                WorldIndex.UniqueInstance.Nikkei225info = this.Nikkei225info;
                WorldIndex.UniqueInstance.DJIAinfo = this.DJIAinfo;
                
               
            }
        }

        #region Singleton
        static WorldIndex instance = new WorldIndex();

        // Public static property to get the object
        public static WorldIndex UniqueInstance
        {
            get { return instance; }
        }
        #endregion Singleton
        
        
           
        }


       
}

